Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

323
Visualizações
How do functions decide what is an event value as an input? Ex. (e) -> {...}

I've see that you can do (e) -> {...} or (event) -> {...} as an input,

But I've also heard you can use any variable for event information like "a", "b", or anything like that. ex. (a) -> {...}

I was under the assumption "e" and "event" were unique, but it sounds like that's not the case from what I've read.

So my question is if I do (a) -> {...} how does the function know "a" contains information about the event? (And why would "a" have information about the event anyway, without being defined or something?)

Thanks, Will

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Values are assigned to function arguments, when the function is called, in order. The names you give you them inside the function are irrelevant and unknowable to anything outside the function.

const a = (one, two) => console.log(one, two);
const b = (two, one) => console.log(one, two);

a(1,2);
b(1,2);

The event object is simply passed as the first argument to the function when it is called.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda